home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 20
/
Cream of the Crop 20 (Terry Blount) (1996).iso
/
bbs
/
cddk9606.zip
/
HEADERS.ARJ
/
CONCERTO.INT
next >
Wrap
Text File
|
1996-06-14
|
16KB
|
503 lines
{ ───────────────────────────────────────────────────────────────────────── }
{ CONCERTO: The Concerto Door Development Kit (Central Unit) }
{ Copyright 1996 David Pinch ∙ All Rights Reserved Worldwide }
{ ───────────────────────────────────────────────────────────────────────── }
UNIT Concerto;
{$B-} { . . . . . . . . . . . . . . . . . . . . Shortcut boolean evaluation }
{$F+} { . . . . . . . . . . . . . . . . . . . . Force far calls for safety }
{$I-} { . . . . . . . . . . . . . . . . . . . Disable input/output checking }
{$O+} { . . . . . . . . . . . . . . . . . . Allow this unit to be overlayed }
{$Q-} { . . . . . . . . . . . . . . Do not generate overflow-checking code }
{$R-} { . . . . . . . . . . . . . . . . Do not generate range-checking code }
{$S-} { . . . . . . . . . . . . . . . . Do not generate stack-checking code }
{$X+} { . . . . . . . . . . . Extended syntax for pChars and function calls }
INTERFACE
USES
IO, Objects, Scripts, xStrings;
TYPE
tFOSSIL = OBJECT(tIODriverRemote)
CONSTRUCTOR Init(p:pChar; c:Word; b,l:LongInt);
FUNCTION CarrierDetect:Boolean; VIRTUAL;
PROCEDURE LowerDTR; VIRTUAL;
PROCEDURE PurgeInbound; VIRTUAL;
PROCEDURE PurgeOutbound; VIRTUAL;
PROCEDURE RaiseDTR; VIRTUAL;
PROCEDURE ReadChar(VAR c:Char); VIRTUAL;
PROCEDURE SendChar(c:Char); VIRTUAL;
FUNCTION Waiting:Boolean; VIRTUAL;
DESTRUCTOR Done; VIRTUAL;
END;
pFOSSIL = ^tFOSSIL;
tSysKey = OBJECT(tObject)
ScanCode : Word;
Script : pChar;
CONSTRUCTOR Init(Code:Word; Source:pChar);
DESTRUCTOR Done; VIRTUAL;
END;
pSysKey = ^tSysKey;
tLocalIO = OBJECT(tIODriver)
SysKeySet : pCollection;
CONSTRUCTOR Init(p:pChar);
PROCEDURE ClrEOL; VIRTUAL;
PROCEDURE ClrScr; VIRTUAL;
PROCEDURE Color(C:Byte); VIRTUAL;
PROCEDURE CursorDown(N:Byte); VIRTUAL;
PROCEDURE CursorLeft(N:Byte); VIRTUAL;
PROCEDURE CursorRight(N:Byte); VIRTUAL;
PROCEDURE CursorUp(N:Byte); VIRTUAL;
PROCEDURE GotoXY(X,Y:Byte); VIRTUAL;
PROCEDURE ReadChar(VAR C:Char); VIRTUAL;
PROCEDURE SendChar(C:Char); VIRTUAL;
PROCEDURE SendString(CONST S:OpenString); VIRTUAL;
FUNCTION Waiting:Boolean; VIRTUAL;
DESTRUCTOR Done; VIRTUAL;
END;
pLocalIO = ^tLocalIO;
tStatusLine = OBJECT(tID)
Size : ShortInt; {. . . . . . . . Size of the status line in rows }
Text : pChar; { Text on the status line (color codes are valid) }
CONSTRUCTOR Init(Name:pChar; Sz:ShortInt; Txt:pChar);
DESTRUCTOR Done; VIRTUAL;
END;
pStatusLine = ^tStatusLine;
tBBS = RECORD
Name : pChar;
SysopFirst : pChar;
SysopLast : pChar;
END;
tChatCfg = RECORD
ExecPrompt : pChar;
Flags : Word;
Greeting : pChar;
Goodbye : pChar;
RemoteExit : Boolean;
SysopColors : tColorScheme;
UserColors : tColorScheme;
END;
tSoftware = RECORD
Application : pChar;
Author : pChar;
Build : STRING[6];
Company : pChar;
Copyright : pChar;
Version : pChar;
END;
tUser = RECORD
Expert : Boolean;
FirstName : pChar;
LastName : pChar;
Location : pChar;
Password : pChar;
PhoneData : pChar;
PhoneFax : pChar;
PhoneVoice : pChar;
Security : LongInt;
END;
CONST
{ Constants for use with the ChatFlags word }
ChatActive = $01; { .......1 } { . . . . . Chat-mode is currently active }
ChatExit = $02; { ......1. } { . . . . . . . . . . . Force termination }
CONST
Baud : LongInt = 0; { . . . . . . . . Connection rate }
CarrierDropped : Boolean = False; { . . . TRUE if the user hung up }
CheckCD : Boolean = True; { . . Check for dropped carrier? }
Color1 : Boolean = True; { . . . DORINFOx.DEF color kludge }
ComPort : Word = 0; { . . . . . . Communications port }
DropFile : pChar = NIL; { . . . . Path/Name of drop file }
FOSSILPtr : pFOSSIL = NIL; { . . FOSSIL interface I/O driver }
FOSSILPort : Word = 0; { . . . . . . . . . . FOSSIL port }
LocalIOPtr : pLocalIO = NIL; { . . . . . . . Local I/O driver }
Locked : LongInt = 0; { . . . . . . . Locked baud rate }
MacroFiller : Char = ' '; { . . . . Fills expanding macros }
Node : LongInt = 0; { . . . . . . . Node/line number }
NoTimeCode : Byte = 0; { . Returned to DOS when no time }
StatusShown : Integer = -1; { . . Index of status line shown }
TimeOutCode : Byte = 0; { . . . . . Errorlevel if timeout }
BBS : tBBS = (
Name : NIL;
SysopFirst : NIL;
SysopLast : NIL );
ChatCfg : tChatCfg = (
ExecPrompt : NIL;
Flags : 0;
Greeting : NIL;
Goodbye : NIL;
RemoteExit : False;
SysopColors : ( Lower:03; Upper:03; Digit:03; HiBit:03; Punct:03 );
UserColors : ( Lower:07; Upper:07; Digit:07; HiBit:07; Punct:07 ));
Software : tSoftware = (
Application : NIL;
Author : NIL;
Build : '960616';
Company : NIL;
Copyright : NIL;
Version : NIL );
User : tUser = (
Expert : False;
FirstName : NIL;
LastName : NIL;
Location : NIL;
Password : NIL;
PhoneData : NIL;
PhoneFax : NIL;
PhoneVoice : NIL;
Security : 0);
{#Start}
FUNCTION AddSysKey(Code:Word; Source:pChar):Boolean;
{
PURPOSE : Associates a scan code with a string of commands.
NOTES : Concerto will compare each local keystroke with the list of
scan codes registered with this function. The commands
are executed if a match is found. A list of common scan
codes can be found in SYSOP.DOC and KEYBOARD.INT.
EXAMPLE : BEGIN
WriteLn('WARNING: The initialization file was not found!');
WriteLn(' The program will use default values.');
AddSysKey(KB_Alt_C,'Chat');
AddSysKey(KB_Alt_H,'HangUp Exit 0');
AddSysKey(KB_Alt_X,'Exit 0');
:
etc
:
END;
}
PROCEDURE CheckLocalMode;
{
PURPOSE : Prompts the sysop for his first and last name if the door
is operating independently of a BBS system.
NOTES : The user will not be prompted if any of the following is true:
1. The door is running remotely.
2. A drop file has been specified.
3. User.FirstName is not NIL.
4. User.LastName is not NIL.
If executed, the file LOCAL.ANS is displayed to the caller.
}
PROCEDURE DefaultNoTimeProcedure;
{
PURPOSE : Convenience. Use this procedure if you do not wish to
write your own no-time-left procedure.
NOTES : The file EXCEEDED is displayed before terminating the call.
Add the following to your main program:
SetNoTimeProcedure(@DefaultNoTimeProcedure);
SEE ALSO : SetNoTimeProcedure
}
PROCEDURE DefaultTimeOutProcedure;
{
PURPOSE : Convenience. Use this procedure if you do not wish to
write your own time-out procedure.
NOTES : The file TIMEOUT.ANS is displayed before terminating the
call. Add the following to your main program:
SetTimeOutProcedure(@DefaultTimeOutProcedure)
SEE ALSO : SetTimeOutProcedure
}
PROCEDURE ExitChatMode;
{
PURPOSE : Terminates the chat-mode, if act